{{include file="header.html"}}
{{assign var="sex" value='sex'|C}}
<body>
	<div class="container_person" id="printContainer">
	<div>
		
	</div>
		<p>创业信息表</p>
		<table border="1" class="item_detail">
			<tr>
				<td>姓名</td>
				<td colspan="2">{{$result.params.name}}</td>
				<td>班级</td>
				<td colspan="2">{{$result.params.class}}</td>
			</tr>
			<tr>
				<td>性别</td>
				<td colspan="2">{{$sex[$result.params.sex_m]}}</td>
				<td>出生日期</td>
				<td colspan="2">{{$result.params.birthdate}}</td>
			</tr>
			<tr>
				<td>身份证</td>
				<td colspan="2">{{$result.params.identify}}</td>
				<td>民族</td>
				<td colspan="2">{{$result.params.nation}}</td>
			</tr>
			<tr>
				<td>学号</td>
				<td colspan="2">{{$result.params.number}}</td>
				<td>手机</td>
				<td colspan="2">{{$result.params.mobile}}</td>
			</tr>
			<tr>
				<td>邮箱</td>
				<td colspan="2">{{$result.params.email}}</td>
				<td>微信</td>
				<td colspan="2">{{$result.params.weixin}}</td>
			</tr>
			<tr>
				<td>家庭住址</td>
				<td colspan="6">{{$result.params.address}}</td>
			</tr>
			<tr>
				<td>爱好特长</td>
				<td colspan="6">{{$result.params.hobby}}</td>
			</tr>
			<tr>
				<td>公司名称</td>
				<td colspan="6">{{$result.params.company_name}}</td>
			</tr>
			<tr>
				<td>经营范围</td>
				<td colspan="6">{{$result.params.range}}</td>
			</tr>
			<tr>
				<td>注册时间</td>
				<td colspan="2">{{$result.params.register_time}}</td>
				<td>注册号</td>
				<td colspan="2">{{$result.params.register_number}}</td>
			</tr>
			<tr>
				<td>注册资金</td>
				<td colspan="2">{{$result.params.register_money}}万元</td>
				<td>员工人数</td>
				<td colspan="2">{{$result.params.member}}人</td>
			</tr>
			<tr>
				<td>占地面积</td>
				<td colspan="2">{{$result.params.size}}平方米</td>
				<td>公司类型</td>
				<td colspan="2">{{$result.params.company_type}}</td>
			</tr>
			<tr>
				<td>公司地址</td>
				<td colspan="6">{{$result.params.company_address}}</td>
			</tr>
			<tr class="h_company">
				<td rowspan="11">合伙人<br>(不超10人)</td>
				<td>姓名</td>
				<td>性别</td>
				<td>手机</td>
				<td>院系</td>
				<td>班级</td>
			</tr>
			{{if !$result.params.company}}
			<tr class="no_company">
				<td colspan="5">无</td>
			</tr>
			{{else}}
			{{foreach from=$result.params.company item=val key=key}}
			<tr class="company">
				<td>{{$val.name_c}}</td>
				<td>{{$val.sex_c}}</td>
				<td>{{$val.phone_c}}</td>
				<td>{{$val.xy_n}}</td>
				<td>{{$val.grade_n}}</td>
			</tr>
			{{/foreach}}
			{{/if}}
			<tr class="h_teacher">
				<td rowspan="2">指导老师<br>(1人)</td>
				<td>姓名</td>
				<td>性别</td>
				<td>院系</td>
				<td>职称</td>
				<td>研究方向</td>
			</tr>
			{{if !$result.params.teacher}}
			<tr class="no_teacher">
				<td colspan="5">无</td>
			</tr>
			{{else}}
			<tr class="teacher">
				<td>{{$result.params.teacher.name_t}}</td>
				<td>{{$result.params.teacher.sex_te}}</td>
				<td>{{$result.params.teacher.xy_name_t}}</td>
				<td>{{$result.params.teacher.job_t}}</td>
				<td>{{$result.params.teacher.process_te}}</td>
			</tr>
			{{/if}}
			<tr>
				<td style="width:80px;">公司简介</td>
				<td colspan="6" class="p">{{$result.params.company_brief}}</td>
			</tr>
		</table>
	</div>
	<div class="btn_p">
		<a href="javascript：void(0);" class="print back" onClick="javascript:history.go(-1);">返回</a>
		<button class="print" onclick="printpage()">打印</button>
		<div class="clear"></div>
	</div>
</body>
<script>
	$(function(){
		var num = $(".item_detail").find(".company").size();
		var need = 10-num;

		if(num<1){
			$(".no_company").show();
			need=need-1;
		}
		for(var i = 0 ;i<need;i++){
			$(".h_company").after("<tr></tr>");
		}

		var num_t =  $(".item_detail").find(".teacher").size();
		if(num_t<1){
			$(".no_teacher").show();
		}

	})
	jQuery.fn.extend({
	    autoHeight: function(){
	        return this.each(function(e){
	            var $this = jQuery(this);
	            if( !$this.attr('_initAdjustHeight') ){
	                $this.attr('_initAdjustHeight', $this.outerHeight());
	            }
	            _adjustH(this).on('input', function(){
	                _adjustH(this);
	            });
	            
	        });
	        /**
	         * 重置高度 
	         * @param {Object} elem
	         */
	        function _adjustH(elem){
	            var $obj = jQuery(elem);
	            test(elem);
	            return $obj.css({height: $obj.attr('_initAdjustHeight'), 'overflow-y': 'hidden'})
	                    .height( elem.scrollHeight );
	        }
	    }
	});
	// 使用
	$(function(){
	    $('textarea').autoHeight();
		$('.col-sm-9').each(function(a,b) {
			var col=$(this);
			var height=col.css('height');
			col.siblings('div.col-sm-1.br.chushi').css('height',height);
		});
				
    });
    function test(elem){
    	var $obj = jQuery(elem);
    	var parent=$obj.parent();
    	var height=elem.scrollHeight+32;
    	parent.siblings('div.col-sm-1.br.chushi').css({height:height});
    	parent.siblings('div.col-sm-1.br.chushi').children('span').css({height:height});
    }

 
    function printpage(){
    	$("#printContainer").printArea();
  	}

    </script>
</html>